package com.moss.cloud.base.biz.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.moss.cloud.base.api.model.from.BaseFrom;
import com.moss.cloud.base.api.model.from.FlowTaskFrom;
import com.moss.cloud.base.api.model.param.FlowTaskParam;
import com.moss.cloud.base.api.model.vo.FlowTaskVO;
import com.moss.cloud.base.biz.model.FlowTask;

import java.util.List;


/**
 * 流程任务业务接口
 *
 * @author 瑾年
 * @date 2024-04-13
 */
public interface IFlowTaskService extends IService<FlowTask> {

    /**
     * 分页查询
     *
     * @param param
     * @return
     */
    IPage<FlowTask> page(FlowTaskParam param);

    /**
     * 新增
     *
     * @param from
     * @return
     */
    boolean saveFlowTask(FlowTaskFrom from);

    /**
     * 更新
     *
     * @param from
     * @return
     */
    boolean update(FlowTaskFrom from);

    /**
     * 删除
     *
     * @param baseFrom
     * @return
     */
    boolean delete(BaseFrom baseFrom);

    /**
     * 详情
     *
     * @param baseFrom
     * @return
     */
    FlowTaskVO detail(BaseFrom baseFrom);

    /**
     * 批量保存任务
     *
     * @param flowTasks
     * @return
     */
    boolean saveBatchFlowTask(List<FlowTask> flowTasks);

    /**
     * 批量删除任务
     *
     * @param busId
     * @return
     */
    boolean removeBatchFlowTask(Long busId);

    /**
     * 审批人抄送人信息
     *
     * @param userIds
     * @return
     */
    List<FlowTaskVO.ApprovalUser> approvalUsers(List<Long> userIds);
}
